# Contributor: Kaarle Ritvanen <kunkku@alpinelinux.org>
# Maintainer: Kaarle Ritvanen <kunkku@alpinelinux.org>
pkgname=ipset
pkgver=7.15
pkgrel=0
pkgdesc="Manage Linux IP sets"
options="!check" # No testsuite
url="https://ipset.netfilter.org/"
arch="all"
license="GPL-2.0-only"
depends_dev="libmnl-dev"
makedepends="$depends_dev automake autoconf libtool linux-headers"
subpackages="$pkgname-dev $pkgname-doc $pkgname-openrc"
source="https://ipset.netfilter.org/ipset-$pkgver.tar.bz2
	ipset.initd"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--with-kmod=no \
		--prefix=/usr
	make
}

package() {
	make install DESTDIR=$pkgdir

	mkdir -p "$pkgdir/etc/init.d" \
		"$pkgdir/etc/ipset.d"
	install -m 755 "$startdir/ipset.initd" "$pkgdir/etc/init.d/ipset"
}

sha512sums="
0fc936d971c30a0925c585d506c8840e782fdaeec09bc8fd249e874fe838fa55a4dbb697f6e1423a6769abf07a1ce2195abc37cb641e8e4ad70f1b4c7130916a  ipset-7.15.tar.bz2
c7d3344ce879ff3b21f9e30a00d49a41cbd68172aec1a933a4b501dded54e3c57615386850901da22c652a34bcbe39caac86a3a0447da24bae29b40632153239  ipset.initd
"
